/PROG  PNS0009
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "V214-A2146365600";
PROG_SIZE	= 3250;
CREATE		= DATE 22-08-17  TIME 15:36:48;
MODIFIED	= DATE 24-12-23  TIME 16:02:20;
FILE_NAME	= PNS0008;
VERSION		= 0;
LINE_COUNT	= 118;
MEMORY_SIZE	= 3730;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0075 ;
   7:  !  PART:V214-6365500 ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=90    ;
  13:  R[18]=1    ;
  14:  R[19]=.2    ;
  15:  R[35]=TIMER[4]    ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  CALL ARM_CHECK    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  27:   ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  TIMER[2]=STOP ;
  36:  R[1]=R[1]+1    ;
  37:  R[2]=TIMER[2]    ;
  38:  R[3]=60/R[2]    ;
  39:  TIMER[2]=RESET ;
  40:  TIMER[2]=START ;
  41:   ;
  42:  !PROCEED TO PICK ;
  43:  LBL[20] ;
  44:  IF DI[1]=ON AND DI[8]=ON,JMP LBL[25] ;
  45:  IF DI[29]=ON,JMP LBL[90] ;
  46:  JMP LBL[20] ;
  47:   ;
  48:  LBL[25] ;
  49:  OVERRIDE=R[5] ;
  50:   ;
  51:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  52:   ;
  53:  DO[1]=OFF ;
  54:J P[4:PICK] 50% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  55:  PAYLOAD[2] ;
  56:  CALL CHK_PICK    ;
  57:   ;
  58:J P[5:PICK DEPART] 100% CNT70 ACC100    ;
  59:  CALL CHECK_PICK    ;
  60:  DO[1]=ON ;
  61:  DO[8]=PULSE,1.0sec ;
  62:  MONITOR Z_CHECH ;
  63:J P[7:PICK CLEAR] 100% CNT100 ACC100 DB  500.0mm,CALL END_PICK    ;
  64:   ;
  65:  LBL[30:GOTO DROP POUNCE] ;
  66:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  67:  OVERRIDE=R[5] ;
  68:   ;
  69:  LBL[40:AT DROP POUNCE] ;
  70:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  71:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  72:  IF DI[18]=ON,JMP LBL[60] ;
  73:  JMP LBL[40] ;
  74:   ;
  75:  LBL[50:MOVE DROP SNEAK] ;
  76:  OVERRIDE=R[5] ;
  77:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  78:  LBL[51:DROP OR C-P-S] ;
  79:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  80:  IF DI[18]=ON,JMP LBL[40] ;
  81:  JMP LBL[51] ;
  82:  JMP LBL[50] ;
  83:   ;
  84:  LBL[60:MOVE CLS-PRS-ACC] ;
  85:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  86:  PAUSE ;
  87:  JMP LBL[30] ;
  88:   ;
  89:  LBL[80:DROP ENABLED] ;
  90:  !PROCEED TO DROP ;
  91:  TIMER[4]=RESET ;
  92:  TIMER[4]=START ;
  93:   ;
  94:  DO[4]=OFF ;
  95:  OVERRIDE=R[5] ;
  96:J P[10:DROP APPROACH] 100% CNT30 ACC100    ;
  97:  MONITOR END Z_CHECH ;
  98:  DO[6]=PULSE,1.0sec ;
  99:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC110 BREAK    ;
 100:  PAYLOAD[1] ;
 101:  CALL CHK_DROP    ;
 102:  OVERRIDE=R[5] ;
 103:J P[12:DROP DEPART] 100% CNT100 ACC130    ;
 104:  DO[7]=PULSE,1.0sec ;
 105:  TIMER[4]=STOP ;
 106:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 107:  !GOTO PICK POUNCE ;
 108:J P[2:PICK POUNCE] 100% CNT100 ACC100    ;
 109:  IF DI[29]=ON,JMP LBL[90] ;
 110:  JMP LBL[10] ;
 111:   ;
 112:  LBL[90:END OF CYCLE] ;
 113:  TIMER[1]=STOP ;
 114:  R[4]=TIMER[1]    ;
 115:J P[1:MIDDLE] 50% CNT100    ;
 116:  MOVE TO HOME    ;
 117:   ;
 118:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2613.039  mm,	Y =    16.985  mm,	Z =  -680.000  mm,
	W =  -179.895 deg,	P =     -.122 deg,	R =   -90.003 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2689.112  mm,	Y =   263.859  mm,	Z =  -920.068  mm,
	W =   179.511 deg,	P =      .081 deg,	R =   -90.005 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2623.136  mm,	Y =   569.113  mm,	Z =  -973.100  mm,
	W =  -179.999 deg,	P =     1.059 deg,	R =   -88.825 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2623.135  mm,	Y =   569.114  mm,	Z = -1077.259  mm,
	W =  -179.999 deg,	P =     1.059 deg,	R =   -88.825 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2623.137  mm,	Y =   569.114  mm,	Z =  -940.140  mm,
	W =  -179.999 deg,	P =     1.059 deg,	R =   -88.825 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2575.143  mm,	Y =  -172.514  mm,	Z =  -920.974  mm,
	W =   179.891 deg,	P =      .553 deg,	R =   -89.067 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2575.145  mm,	Y =  -741.517  mm,	Z =  -919.999  mm,
	W =   179.852 deg,	P =      .370 deg,	R =   -88.458 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2770.936  mm,	Y = -2146.433  mm,	Z =  -968.895  mm,
	W =  -179.971 deg,	P =      .904 deg,	R =   -89.486 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2570.961  mm,	Y = -2833.857  mm,	Z =  -996.594  mm,
	W =   179.767 deg,	P =      .455 deg,	R =   -86.231 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2570.963  mm,	Y = -2833.857  mm,	Z = -1096.673  mm,
	W =   179.767 deg,	P =      .455 deg,	R =   -86.231 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2570.963  mm,	Y = -2833.857  mm,	Z = -1028.994  mm,
	W =   179.767 deg,	P =      .455 deg,	R =   -86.231 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2615.189  mm,	Y = -1485.654  mm,	Z = -1002.499  mm,
	W =   179.534 deg,	P =     1.153 deg,	R =   -89.332 deg
};
/END
